package com.westos.userauth.dao.impl;

import com.westos.userauth.dao.UserLoginSecurityGroupDao;
import com.westos.userauth.dao.mybatis.UserLoginSecurityGroupDAO;
import com.westos.userauth.domain.SecurityPermission;
import com.westos.userauth.domain.UserLogin;
import com.westos.userauth.domain.UserLoginSecurityGroup;
import com.westos.userauth.service.impl.PartyServiceImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class MybatisUserLoginSecurityGroupDao implements UserLoginSecurityGroupDao {
    @Autowired
    private UserLoginSecurityGroupDAO userLoginSecurityGroupDAO;

    @Override
    public List<UserLoginSecurityGroup> queryGroupIdByLoginId(String loginId) {
        return userLoginSecurityGroupDAO.queryGroupIdByLoginId(loginId);
    }

    @Override//方政
    public List<SecurityPermission> queryByUserLogin(UserLogin userLogin) {
        return null;
    }

    @Override
    public int updateByUserLoginIdAndGroupIdAndFromDate(UserLoginSecurityGroup userLoginSecurityGroup) {
        return userLoginSecurityGroupDAO.updateByUserLoginIdAndGroupIdAndFromDate(userLoginSecurityGroup);
    }

    public UserLoginSecurityGroupDAO getUserLoginSecurityGroupDAO() {
        return userLoginSecurityGroupDAO;
    }

    public void setUserLoginSecurityGroupDAO(UserLoginSecurityGroupDAO userLoginSecurityGroupDAO) {
        this.userLoginSecurityGroupDAO = userLoginSecurityGroupDAO;
    }
}
